#region Copyright RenGuiYou. All rights reserved.
//=====================================================
// PandoraFrameWork
// Author:      RenGuiyou
// Feedback: 	mailto:750539605@qq.com
//=====================================================
#endregion
using UnityEditor;

namespace PandoraEditor.Window
{
    public abstract class ConfigCategory
    {
        public string name { get; protected set; }
        public bool hasHelper { get; protected set; }

        public virtual void OnInit()
        {
        }

        public abstract void OnDrawAction();

        public virtual void OnHelpAction()
        {
        }

        public void DrawAction()
        {
            EditorGUI.BeginChangeCheck();
            OnDrawAction();
            if (EditorGUI.EndChangeCheck())
            {
                UserSetting.SaveAll();
            }
        }
    }
}
